package butines.game2.command;

import java.util.ArrayList;
import java.util.List;


public class Command {
   
    private CommandType type;
    private List<Integer> ids;
    private int targetId;
    private int targetX;
    private int targetY;
    
    public Command(CommandType type) {
        this.type = type; 
        ids = new ArrayList<>();
    }
    
    public void add(int entityId) {
        ids.add(entityId);
    }
    
    public Iterable<Integer> getIds() {
        return ids;
    }

    public int getTargetId() {
        return targetId;
    }

    public void setTargetId(int targetId) {
        this.targetId = targetId;
    }

    public int getTargetX() {
        return targetX;
    }

    public void setTargetX(int targetX) {
        this.targetX = targetX;
    }

    public int getTargetY() {
        return targetY;
    }

    public void setTargetY(int targetY) {
        this.targetY = targetY;
    }
    
    public boolean isEmpty() {
        return ids.isEmpty();
    }

    public CommandType getType() {
        return type;
    }
    
}
